package god;

import java.util.Scanner;

public class J01Retangle {
	public static double getArea(double a, double b) {
		double h;
		h = a * b;
		return h;
	}

	public static double getPerimeter(double c, double d) {
		double g;
		g = (c + d) * 2;
		return g;
	}

	public static void main(String[] args) {

		double area, Perimeter;
		double width = 1.0, height = 1.0;
		String color = "white";

		System.out.println("가로와 세로를 입력해 주세요");
		Scanner scanner = new Scanner(System.in);
		width = scanner.nextDouble();
		height = scanner.nextDouble();

		System.out.println("사각형의 색을 입력해 주세요");
		Scanner sc = new Scanner(System.in);
		color = sc.nextLine();

		area = getArea(width, height);
		Perimeter = getPerimeter(width, height);

		System.out.println("사각형의 면적 = " + area);
		System.out.println("사각형의 둘레 = " + Perimeter);
		System.out.println("사각형의 색 = " + color);

		scanner.close();
		sc.close();

	}

}
